# coding=utf-8
"""
字符串常用操作
"""

def to_csv_string(_values):
    strs = []
    for v in _values:
        strs.append(str(v))
        # if isinstance(v, datetime.date) :
        #     strs.append(v.strftime('%Y-%m-%d'))
        # else:
        #     strs.append(str(v))

    return ",".join(strs)



def get_v(_vin) :
    """将无效的数据转成0"""
    if _vin == '' or _vin == '-':
        return 0
    else:
        return _vin